<#ftl output_format="HTML" >
<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
        <title>错误 [Sipahi]</title>
        <link rel="shortcut icon" href="<@spring.url '/images/favicon.ico' />" type="image/x-icon">
        <link rel="icon" href="<@spring.url '/images/favicon.ico' />" type="image/x-icon">
        <#include "/css.ftl" />
    </head>
    <body>
        <div class="card border-danger as-error-box">
            <div class="card-header text-white bg-danger">
                错误
            </div>
            <table class="table">
                <tr>
                    <th class="text-right">时间：</th>
                    <td>${timestamp?datetime}</td>
                </tr>
<#if exception??>
                <tr>
                    <th class="text-right">类型：</th>
                    <td>${exception}</td>
                </tr>
</#if>
<#if message??>
                <tr>
                    <th class="text-right">消息：</th>
                    <td>${message}</td>
                </tr>
</#if>
<#if code??>
                <tr>
                    <th class="text-right">错误码：</th>
                    <td>${code}</td>
                </tr>
</#if>
<#if extras??>
                <tr>
                    <th class="text-right">附加数据：</th>
                    <td>
<#list extras>
                    <#items as ek, ev>
                    ${ek}=${ev}<#sep>,</#sep>
                    </#items>
<#else>
</#list>
                    </td>
                </tr>
</#if>
<#if sqlState??>
                <tr>
                    <th class="text-right">SQL State：</th>
                    <td>${sqlState}</td>
                </tr>
</#if>
<#if sqlErrorCode??>
                <tr>
                    <th class="text-right">SQL Error Code：</th>
                    <td>${sqlErrorCode}</td>
                </tr>
</#if>
            </table>
        </div>
<script>
"use strict";
<#if trace??>
<#list trace>
const errorLines = ''
<#items as line>
<#if line?has_next>
  + '${line?js_string?no_esc}\n'
<#else>
  + '${line?js_string?no_esc}';
</#if>
</#items>
console.error(errorLines);
<#else>
</#list>
</#if>
</script>
    </body>
</html>
